
import pandas as pd
from sklearn import svm, metrics, model_selection
# 读取CSV文件 --- (※1)
csv = pd.read_csv('/Users/www14/Desktop/Python/senior/python_senior-master/python_senior-master/expiration/B站番剧3.csv',)
# print(csv)

# 案列数据分类处理 --- (※2)pl
csv_data = csv[[ "标题","播放量", "评论量"]]
csv_label = csv["种类"]
print('csv_data:', csv_data)
print('csv_label: ', csv_label)

train_data, test_data, train_label, test_label = \
    model_selection.train_test_split(csv_data, csv_label, test_size=0.15)
print('train_data: ', len(train_data))
print('test_data: ', len(test_data))
print('train_label: ',len(train_label))
print('test_label: ',len(test_label))




